package factoryMethod;
/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-07-23 14:39
 * @notify 葡萄
 * @version 1.0
 */

import factoryMethod.Fruit;

public class Grape implements Fruit {
    //有籽无籽
    private boolean seedless;

    @Override
    public void grow() {
        log("Grape is growing...");
    }

    @Override
    public void harvest() {
        log("Grape has been harvested");
    }

    @Override
    public void plant() {
        log("Grape has been planted");
    }

    //    辅助方法
    public static void log(String msg) {
        System.out.println(msg);
    }

    //    有籽无籽的取值方法
    public boolean getSeedless() {
        return seedless;
    }

    //设置有籽无籽的方法
    public void setSeedless(boolean seedless) {
        this.seedless = seedless;
    }
}
